package receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import application.UIApplication;

public abstract class UploadFinishReceiver extends BroadcastReceiver{

	public static final String Action = UIApplication.PackageName+".Receiver.UploadFinish";
	@Override
	public void onReceive(Context context, Intent intent) {
		if (Action.equals(intent.getAction())){
			//
			String tag = intent.getStringExtra("tag");
			String url = intent.getStringExtra("url");
			String filePath = intent.getStringExtra("filePath");
			String webResult = intent.getStringExtra("webResult");
			UploadFinish(context, intent, url, filePath, webResult,tag);
		}
	}

	/**
	 * 上传成功
	 * @param context
	 * @param intent
	 * @param url 上传地址
	 * @param filePath 本地文件路径
	 * @param webResult 上传成功之后服务器返回的结果
	 * @param tag 自定义标识
	 */
	public abstract void UploadFinish(Context context, Intent intent,String url,String filePath,String webResult,String tag);

}
